<?php
/**
 * interactivecontroller.php
 * 
 * Create on 2015-04-02
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\index;
use haibao\cms\business\control\PublicController as PublicControllerBusiness;


class InteractiveController extends \haibao\cms\business\control\pc\channel\ChannelController{
	
	const BLOG_HUA_TIHUI = 18496;
	public static $noticeBoardTag = array(10081,10082);  
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	/**
	 * 显示模版内容（模版动态数据的绑定和模版输出）
	 * @param : String $content
	 * @param : Array $controlData;
	 */
	public function displayTemplateHtml(){

		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		
		$parameters = $right = $blogArr =  array();
		if($controlData['auto']){
				
			$temp = array();
			foreach($controlData['auto'] as $data){
				$parameterValue = json_decode($data['ParameterValue']);
				array_push($parameters,$parameterValue);
			}
			$right = array_slice($parameters, 0,3);
		}
		$this->assign('right', $right);
		$this->assign('blogList', PublicControllerBusiness::getThreadData());
		$this->assign('channelUrl', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_SAY));
		
		$path = $this->generateHtmlPath(__CLASS__);
		$this->generateHtml($path,$content);

		$content = $this->getHtml($path);
		$content = $this->replaceCDNLink($content);	
		return $content;
	}
}